/* Import all components */

@import 'themes/default/globals/site.variables';
@import 'themes/pxt/globals/site.variables';

/* Reference import */

@import (reference) "semantic.less";

@blocklyLightTextColor: #fff;
@blocklyDarkTextColor: #575E75;
@fieldNoteSelectedColor: yellowgreen;

////// Note Editor Field ////////
.blocklyDropDownContent {
    .blocklyPianoDiv {
        position: relative;
        touch-action: none;
    }

    .blocklyNote {
        border: solid 0.5px;
        cursor: pointer;
        display: inline-block;
        position: absolute;
        top: 0px;
        border-bottom-left-radius: 3px;
        border-bottom-right-radius: 3px;
        background-color: white;
        z-index: @noteEditorWhiteKey;
    }

    .blocklyNote.black {
        background-color: black;
        z-index: @noteEditorBlackKey;
    }

    .blocklyNote:hover {
        background-color: yellow !important;
    }

    .blocklyNote.selected {
        background-color: @fieldNoteSelectedColor !important;
    }

    .blocklyNoteLabel {
        border: solid 0.5px;
        color: white;
        display: inline-block;
        line-height: normal;
        position: absolute;
        text-align: center;
        font-family: @blocklyFont;
        font-size: 12pt;
    }

    .blocklyNotePrevNext {
        border: solid 0.5px;
        border-top: 0;
        cursor: pointer;
        color: white;
        display: inline-block;
        font-weight: bold;
        line-height: normal;
        position: absolute;
        text-align: center;
    }

    .blocklyDropdownTextLabel {
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
        width: 70px;
        display: inline-block;
        color: white;
        font-size: 12px;
    }
}
////// Grid Picker Editor Field ////////
.blocklyGridPickerTooltip {
    z-index: @gridPickerZIndex;
}

.blocklyGridPickerPadder {
    outline: none;
    box-shadow: 0px 0px 8px 1px rgba(0, 0, 0, .3)
}

.blocklyWidgetDiv .blocklyGridPickerRow {
    display: table-row;
}

.blocklyWidgetDiv .blocklyGridPickerMenu {
    display: table;
    outline: none;
    border-spacing: 7px;
}

.blocklyGridPickerScroller {
    outline: none;
    padding: 4px;
    border-radius: 4px;
    position: relative;
    -webkit-overflow-scrolling: touch;
}

.blocklyGridPickerPadder {
    border-radius: 4px;
    outline: none;
    position: relative;
}

.blocklyGridPickerPadder .ui.input i.search.icon {
    margin-top: -0.2rem;
}

.blocklyWidgetDiv .blocklyGridPickerMenu .goog-menuitem {
    background: white;
    cursor: pointer;
}

.blocklyWidgetDiv .blocklyGridPickerMenu .goog-menuitem-highlight, .blocklyWidgetDiv .blocklyGridPickerMenu .goog-menuitem-hover {
    background: #d6e9f8;
    box-shadow: 0px 0px 0px 4px rgba(255, 255, 255, 0.2);
}

.blocklyWidgetDiv .blocklyGridPickerMenu .goog-option {
    border: solid 1px black;
    border-radius: 4px;
    color: #fff;
    font-size: 12pt;
    font-weight: bold;
    display: table-cell;
    padding: 8px;
    text-align: center;
    vertical-align: top;
    -webkit-user-select: none;
    -moz-user-select: -moz-none;
    -ms-user-select: none;
        user-select: none;
}

.blocklyWidgetDiv .blocklyGridPickerMenu .floatLeft {
    float: left;
}

.blocklyWidgetDiv .blocklyGridPickerMenu .goog-option.goog-option-selected {
    position: relative;
}

.blocklyWidgetDiv .blocklyGridPickerMenu .goog-menuitem .goog-menuitem-checkbox {
    display: none;
}

.blocklyGridPickerTooltip {
    z-index: @gridPickerTooltipZIndex;
}

.blocklyGridPickerSelectedBar {
    display: flex;
    padding-top: 5px;
    justify-content: space-between;
}

.blocklyGridPickerSelectedImage {
    padding: 3px;
    display: inline-block;
    vertical-align: middle;
}

.ui.input input.blocklyGridPickerSearchBar {
    background: none;
    border: none;
    color: white;
}

.ui.input input.blocklyGridPickerSearchBar::placeholder {
    color: white;
}

.ui.input input.blocklyGridPickerSearchBar::-webkit-input-placeholder {
    color: white;
}

.ui.input input.blocklyGridPickerSearchBar::-moz-placeholder {
    color: white;
}

.ui.input input.blocklyGridPickerSearchBar:-ms-input-placeholder {
    color: white;
}

.ui.input input.blocklyGridPickerSearchBar:-moz-placeholder {
    color: white;
}

////// Toggle Editor Field ////////
.blocklyToggle {
    transition: transform 1s;
}

.blocklyToggle .blocklyToggleCircle, .blocklyToggle .blocklyToggleRect {
    stroke-width: 1px;
    stroke: grey;
    stroke-opacity: 0.4;
}
.blocklyToggle.blocklyToggleOn .blocklyToggleCircle, .blocklyToggle.blocklyToggleOn .blocklyToggleRect {
    fill: #4DDc64;
}
.blocklyToggle.blocklyToggleOff .blocklyToggleCircle, .blocklyToggle.blocklyToggleOff .blocklyToggleRect {
    fill: #95a5a6;
}
.blocklyToggle.blocklyToggleOnBreakpoint polygon {
    fill: #E80D00;
    stroke: #fff;
    stroke-width: 12px !important;
    stroke-opacity: 1;
    stroke-linecap: round;
    stroke-opacity: 1;
    cursor: pointer;
}
.blocklyToggle.blocklyToggleOffBreakpoint polygon {
    fill: #333;
    stroke: 0px;
    cursor: pointer;
}

.blocklyToggle ~ .blocklyText.blocklyToggleText {
    font-size: 10pt;
    cursor: pointer;
}
.blocklyToggle.blocklyToggleOff ~ .blocklyText.blocklyToggleText {
    fill: white;
}

////// RGB Color picker ////////
.blocklyDropDownDiv .rgbColorPicker > tr > td > div {
    height: 40px;
    width: 40px;
}

////// Color wheel ////////
.blocklyDropDownDiv .blocklyFieldSliderReadout .blocklyColorReadout {
    height: 20px;
    width: 25px;
    border-radius: 10px;
    display: inline-block;
    vertical-align: middle;
}


////// position picker ////////
#custom-content .blocklyLightboxDiv {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0, 0, 0, 0.55);
    z-index: 993;
}

.blocklyCanvasOverlayOuter {
    padding: 0.5rem;
    margin: 0.1rem;
    background: #249ca3;
    border: solid 2px #249ca3;
    border-top-left-radius: 1rem;
    border-top-right-radius: 1rem;
    border-bottom-left-radius: 0;
    border-bottom-left-radius: 0;
}

.blocklyCanvasOverlayDiv {
    cursor: none;
    background-color: rgba(255, 255, 255, 0.9);
    z-index: 10000;
    position: relative;
    overflow: hidden;
    border: solid 5px #333333;

    clip-path: polygon(0% 4px, 4px 0%, calc(100% - 2px) 0%, 100% 4px,
    100% calc(100% - 2px), calc(100% - 2px) 100%, 4px 100%, 0 calc(100% - 2px));

    .cross-x, .cross-y {
        background-color: #575E75;
        position: absolute;
    }
    .cross-x {
        width: 100%;
        height: 2px;
        z-index: 10;
    }

    .cross-y {
        width: 2px;
        height: 100%;
        z-index: 10;
    }
    .label {
        position: absolute;
        color: #575E75;
        font-size: 100%;
        white-space: nowrap;
    }
}

.positionEyedropper {
    background: none;
    outline: none;
    border: none;
    width: 100%;
    text-align: center;
    border-top: 1px solid #ddd;
    padding-top: 5px;
    cursor: pointer;
}

.positionEyedropper:hover {
    background: #eee;
}